package fhb.mobile.todoapp.datamodell;

import java.util.ArrayList;
import java.util.Collection;

public class ToDoItemList extends ArrayList<ToDoItem> {

	private static final long serialVersionUID = -3876220904095014589L;
	private String mail = "";
	private String passwordHash = "";
	
	public ToDoItemList() {
		super();
	}

	public ToDoItemList(String mail, String password) {
		super();
		setMail(mail);
		setPassword(password);
	}
	
	public ToDoItemList(String mail, String password, int capacity) {
		super(capacity);
		setMail(mail);
		setPassword(password);
	}

	public ToDoItemList(String mail, String password, Collection<? extends ToDoItem> collection) {
		super(collection);
		setMail(mail);
		setPassword(password);
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		if (mail != null)
			this.mail = mail;
	}

	public String getPasswordHash() {
		return passwordHash;
	}

	public void setPassword(String password) {
		if (passwordHash != null)
			this.passwordHash = String.valueOf(password.hashCode());
	}
}
